
<template>
  <el-container class="home_container">
    <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
      <el-menu :router="true">
        <el-submenu index="1">
          <template slot="title"><i class="el-icon-message"></i>导航一</template>
            <el-menu-item index="artcile">选项1</el-menu-item>
        </el-submenu>
      </el-menu>
    </el-aside>

    <el-container>
  <!--  退出按钮-->
      <el-header>
        <el-button type="primary" @click="logout()">退出</el-button>
      </el-header>
      <el-main>
        <router-view></router-view>
      </el-main>
      <el-footer>Footer</el-footer>
    </el-container>
  </el-container>
</template>

<script>
export default {
  data() {
    return {

  }

},
  methods:{
    logout()
    {
      //清楚session
      window.sessionStorage.clear()
      //跳转到、login
      this.$router.push('/login')
    }

  }
};
</script>

<style>
.home_container{
  height: 100%;
}
.el-header {
  background-color: #2b4b6b;
  color: #fff;
}
.el-aside {
  background-color: #ccc;
  height: 100%;
}
</style>